/* 
 * File:   PostingFileDB.cpp
 * Author: eduardo
 *
 * Created on 20 de noviembre de 2012, 12:17
 */

#include "PostingFileDB.h"

PostingFileDB::PostingFileDB(int idpf, const vector<DocOccurrence>& vec) {
    _idpf = idpf;
    for (int i = 0; i < vec.size(); i++) {
        _occurrences.push_back(vec.at(i));
    }
}

void PostingFileDB::pushBack(const DocOccurrence& doc) {
    _occurrences.push_back(doc);
}

int PostingFileDB::getIDPF() {
    return _idpf;
}

const vector<DocOccurrence>& PostingFileDB::getOccurrences() {
    return _occurrences;
}